﻿<UserControl x:Class="personalplaner.views.MainMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:personalplaner.common.controls;assembly=personalplaner.common"
             xmlns:p="clr-namespace:personalplaner.Properties"
             xmlns:k="clr-namespace:personalplaner.common.themes;assembly=personalplaner.common"
             xmlns:vm="clr-namespace:personalplaner.common.mvvm.factory;assembly=personalplaner.common"
             xmlns:fac="clr-namespace:personalplaner.viewmodels.factories"
             vm:ViewModelLoader.FactoryType="{x:Type fac:MainMenuFactory}"
             mc:Ignorable="d">
    
    <Control.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/personalplaner.gui;component/resources/MenuTemplate.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Control.Resources>
    
    <Grid>
        <!--<Menu>
            <MenuItem Header="test">
                <MenuItem Header="test item"/>
            </MenuItem>
            
            <MenuItem Header="Stammdaten">
                <MenuItem Header="Person">
                    <MenuItem Header="Personalstamm" Command="{Binding PersonalStammCommand}"/>
                    <MenuItem Header="Person hinzufügen" Command="{Binding PersonHinzufügenCommand}"/>
                </MenuItem>
                <MenuItem Header="Abteilungen" Command="{Binding AbteilungsStammCommand}"/>
                <MenuItem Header="Anstellungen" Command="{Binding AnstellungsStammCommand}"/>
            </MenuItem>
        </Menu>-->



        <c:MenuButton FontSize="15" Text="Personalplaner" Width="150" HorizontalAlignment="Left" Margin="0,8,0,0" Foreground="{DynamicResource {x:Static k:ResourceKeys.ForegroundBrush}}">
            <StackPanel Orientation="Vertical" Margin="5" Width="130">
                <c:MenuButton Text="Einstellungen" Command="{Binding SettingsCommand}"/>
                <Separator />
                <c:MenuButton Text="Beenden" Command="{Binding CloseCommand}"/>
            </StackPanel>
        </c:MenuButton>

        <!--<TabControl Style="{StaticResource MenuTabControl}" ItemContainerStyle="{StaticResource MainMenuTabItem}">-->
        <TabControl Style="{DynamicResource {x:Static k:ResourceKeys.MainMenuTabControlStyleKey}}" ItemContainerStyle="{DynamicResource {x:Static k:ResourceKeys.MainMenuTabItemStyleKey}}">

            <TabItem Header="Bearbeiten">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <c:MenuButton Text="Dienstplan erstellen" Command="{Binding CreateNewPlanCommand}"/>
                </Grid>
            </TabItem>

            <!--<TabItem Header="Ansicht">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <c:MenuButton Text="Dienstplan" Command="{Binding DienstPlanCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="1"/>

                    <c:MenuButton Grid.Column="2" Text="Personen Übersicht" Command="{Binding PersonOverviewCommand}"/>
                </Grid>
            </TabItem>-->

            <TabItem Header="Stammdaten">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <c:MenuButton Text="Person">
                        <StackPanel Orientation="Vertical" Margin="5">
                            <c:MenuButton Text="Personalstamm" Command="{Binding PersonalStammCommand}"/>
                            <c:MenuButton Text="Person hinzufügen" Command="{Binding PersonHinzufügenCommand}"/>

                            <Border Background="#90000000" Margin="5" Height="1" />
                            <c:MenuButton Text="Ferien" Command="{Binding HolidayStammCommand}"/>
                        </StackPanel>
                    </c:MenuButton>
                    
                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="1"/>

                    <c:MenuButton Text="Dienste" Grid.Column="2">
                        <StackPanel Orientation="Vertical" Margin="5">
                            <c:MenuButton Text="Dienste" Command="{Binding DiensteStammCommand}"/>
                            <c:MenuButton Text="Dienstserie" Command="{Binding DienstSerieCommand}"/>
                        </StackPanel>
                    </c:MenuButton>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="3"/>
                    
                    <c:MenuButton Grid.Column="4" Text="Teams" Command="{Binding AbteilungsStammCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="5"/>
                    
                    <c:MenuButton Grid.Column="6" Text="Anstellungen" Command="{Binding AnstellungsStammCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="7"/>

                    <c:MenuButton Grid.Column="8" Text="Plan Layout" Command="{Binding PlanLayoutStammCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="9"/>

                    <c:MenuButton Grid.Column="10" Text="Termine" IsEnabled="False"/>

                </Grid>
            </TabItem>

            <TabItem Header="Extras">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <c:MenuButton Text="Dienstpläne" Command="{Binding PlanStammCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="1"/>

                    <c:MenuButton Text="Monate" Grid.Column="2" Command="{Binding EditMonthsCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="3"/>

                    <c:MenuButton Grid.Column="4" Text="Feiertage" Command="{Binding FeiertageStammCommand}"/>

                    <Border Background="#90FFFFFF" Margin="5" Width="1" Grid.Column="5"/>

                    <c:MenuButton Grid.Column="6" Text="Planungsjahr" Command="{Binding PlanungsjahrStammCommand}"/>
                </Grid>
            </TabItem>

        </TabControl>

        <Menu HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,15,10,0" Style="{DynamicResource {x:Static k:ResourceKeys.StyleMenuStyleKey}}" >
            <MenuItem Header="{x:Static p:Resources.Style}" Style="{DynamicResource {x:Static k:ResourceKeys.StyleMenuItemStyleKey}}">
                <MenuItem Header="{x:Static p:Resources.Dark}" Command="{Binding StyleCommand}" CommandParameter="Dark" Style="{DynamicResource {x:Static k:ResourceKeys.StyleMenuItemStyleKey}}"/>
                <MenuItem Header="{x:Static p:Resources.Gray}" Command="{Binding StyleCommand}" CommandParameter="Gray" Style="{DynamicResource {x:Static k:ResourceKeys.StyleMenuItemStyleKey}}"/>
            </MenuItem>
        </Menu>
        
    </Grid>
</UserControl>
